<?php
/**
 * dao importdao
 * @package app-drama_lib_dao
 */
load_lib('/dao/basedao');
/**
 * dao importdao
 * @author pandajingjing
 * @package app-drama_lib_dao
 */
class dao_importdao extends dao_basedao{

    /**
	 * 获得导入文件列表
	 * @param array $p_arrParam
	 * @return array
	 */
    static function getImportList($p_arrParam){
        $strSQL='';
        $arrParam=array();
        if(isset($p_arrParam['DSTATUS'])){
            $strSQL.=' and DSTATUS=:DSTATUS';
            $arrParam['DSTATUS']=$p_arrParam['DSTATUS'];
        }
        if(isset($strSQL[0])){
            $strSQL=substr($strSQL,4);
        }
        $objORM=parent::getORM('drama_import','drama_db');
        if(isset($p_arrParam['SORT'])){
            $objORM->setOrder($p_arrParam['SORT']);
        }
        return $objORM->getList($strSQL,$arrParam);
    }

    /**
     * 更新导入文件状态
     * @param array $p_arrParam
     * @return int
     */
    static function updImportFile($p_arrParam){
        $p_arrParam['UPDATETIME']=parent::getTime();
        return parent::updData('drama_import',$p_arrParam,'drama_db');
    }
}